Skip to content

Conversation

@lolbinarycat
Copy link
Contributor

No description provided.

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels Nov 6, 2025
@lolbinarycat
Copy link
Contributor Author

@bors2 try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Nov 6, 2025
[DO NOT MERGE] Experiment with micro-optimizing push_str calls
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Nov 6, 2025
@rust-log-analyzer

This comment has been minimized.

@lolbinarycat
Copy link
Contributor Author

@bors try cancel

@rust-bors
Copy link

rust-bors bot commented Nov 6, 2025

Try build cancelled. Cancelled workflows:

@lolbinarycat lolbinarycat force-pushed the experiment-push_str_slice branch from f04df73 to 226e775 Compare November 6, 2025 19:57
@lolbinarycat
Copy link
Contributor Author

@bors2 try @rust-timer queue

@rust-timer

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Nov 6, 2025
[DO NOT MERGE] Experiment with micro-optimizing push_str calls
@rust-bors

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@lolbinarycat lolbinarycat force-pushed the experiment-push_str_slice branch from 226e775 to 36de490 Compare November 6, 2025 20:11
@lolbinarycat
Copy link
Contributor Author

@bors try cancel

@rust-bors
Copy link

rust-bors bot commented Nov 6, 2025

Try build cancelled. Cancelled workflows:

@lolbinarycat
Copy link
Contributor Author

@bors2 try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Nov 6, 2025
[DO NOT MERGE] Experiment with micro-optimizing push_str calls
@Kobzol
Copy link
Member

Kobzol commented Nov 6, 2025

Btw, you don't need to cancel the previous try build when making a new one. Bors will automatically cancel the previous one.

@rust-log-analyzer
Copy link
Collaborator

The job aarch64-gnu-llvm-20-1 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[RUSTC-TIMING] rustc_demangle test:false 1.214
error: missing documentation for a method
    --> library/alloc/src/string.rs:1117:5
     |
1117 |     pub fn push_str_slice(&mut self, slice: &[&str]) {
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = note: `-D missing-docs` implied by `-D warnings`
     = help: to override `-D warnings` add `#[allow(missing_docs)]`

@rust-bors
Copy link

rust-bors bot commented Nov 6, 2025

☀️ Try build successful (CI)
Build commit: 978d49e (978d49ebec63bc482a297308eb28bd9bfff55fb6, parent: c90bcb9571b7aab0d8beaa2ce8a998ffaf079d38)

@rust-timer

This comment has been minimized.

@lolbinarycat
Copy link
Contributor Author

Huh. CI failed but the try build didn't, is this another case of a check only being run in CI, or did something about bors change so that perf can continue even if there's an issue?

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (978d49e): comparison URL.

Overall result: no relevant changes - no action needed

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

@bors rollup=never
@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (primary -2.3%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.3% [-2.3%, -2.3%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -2.3% [-2.3%, -2.3%] 1

Cycles

Results (secondary -5.8%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-5.8% [-5.8%, -5.8%] 1
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 475.185s -> 474.535s (-0.14%)
Artifact size: 390.81 MiB -> 390.80 MiB (-0.00%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Nov 7, 2025
@lolbinarycat
Copy link
Contributor Author

It's a very slight improvement by every metric, including artifact size, surprisingly. I think I might open an ACP for push_str_slice, it's not a huge improvement, but it's basically free for any code that builds strings in this manner, and I do suspect there's probably some user who is doing this in a hot inner loop and would appreciate saving some cycles (i saw around a 30% improvement in local microbenchmarks vs just calling push_str twice, probably relevant for some serialization code).

@Kobzol
Copy link
Member

Kobzol commented Nov 7, 2025

The default try build just builds the compiler, and doesn't run any tests. So often it succeeds even if CI fails, it's by design.

@Kobzol
Copy link
Member

Kobzol commented Nov 7, 2025

FWIW, the artifact size is noise, and the icount results are a wash. It doesn't seem to me that this has an effect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants